#!/bin/sh


if [ $(arch) = "x86_64" ]
    then
        wget http://data.libregamenight.xyz/pub/minetest/amd64.deb
        sudo dpkg -i amd64.deb
        if [ $? -eq 1 ]
        then
            sudo apt-get install -f
            sudo dpkg -i amd64.deb
        fi
    else
        wget http://data.libregamenight.xyz/pub/minetest/i386.deb
        sudo dpkg -i i386.deb
        if [ $? -eq 1 ]
        then
            sudo apt-get install -f
            sudo dpkg -i i386.deb
        fi
fi

echo "Time to reap the profits, now!"
echo "If everything, went smoothly, Minetest is now installed-- it should be in your Games menu."
echo "Cheers!"
